﻿using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WpfApp4
{
    /// <summary>
    /// Suspension.xaml 的交互逻辑
    /// </summary>
    public partial class Suspension : Window
    {
        public static ILog log = LogManager.GetLogger(typeof(Suspension));
        public SendLogDelegate sendLogDelegate;


        public Suspension()
        {
            InitializeComponent();

            #region 启动时串口最大化显示
            Rect rc = SystemParameters.WorkArea; //获取工作区大小
            this.Left = SystemParameters.FullPrimaryScreenWidth - 170;
            this.Top = SystemParameters.FullPrimaryScreenHeight - 170;
            #endregion
        }

        private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            log.Info("Image_MouseLeftButtonDown");
            if (sendLogDelegate != null) {
                sendLogDelegate();
            }


        }

        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            System.Windows.Application.Current.Shutdown();
        }
    }
}
